home *** CD-ROM | disk | FTP | other *** search
- // ----------------------------------------------------------------------
- // POV368KNot.c - Very simple application to display a dialog box & quit.
- // This is specifically for adding to a PowerMac application, in case
- // somebody tries to run it on a 68K Macintosh. Instead of getting the
- // cryptic "No resource found" error message, this will give a human-readable
- // error and quit.
- // Written by: Eduard Schwan
- // ----------------------------------------------------------------------
-
-
- #include <Types.h>
- #include <Memory.h>
- #include <Quickdraw.h>
- #include <Fonts.h>
- #include <Events.h>
- #include <Menus.h>
- #include <Windows.h>
- #include <TextEdit.h>
- #include <Resources.h>
- #include <Dialogs.h>
- #include <OSUtils.h>
- #include <ToolUtils.h>
-
-
- // ----------------------------------------------------------------------
- static void Initialize(void)
- {
- /* Initialize all the needed managers. */
- InitGraf(&qd.thePort);
- InitFonts();
- InitWindows();
- InitMenus();
- TEInit();
- InitDialogs(0L);
- InitCursor();
-
- }
-
-
- // ----------------------------------------------------------------------
- static void DarkSideOfTheMoon()
- {
- OSErr anError;
- short itemHit;
- WindowPtr myDialog;
- SysEnvRec theWorld;
-
- anError = SysEnvirons(1, &theWorld);
- if (theWorld.systemVersion < 0x0700)
- {
- }
- myDialog = GetNewDialog(6900, NULL, (WindowPtr)-1);
- anError = ResError();
- if (myDialog)
- ShowWindow(myDialog);
- // beep no matter what
- SysBeep(1);
- if (myDialog)
- ModalDialog(NULL, &itemHit);
- }
-
-
- // ----------------------------------------------------------------------
- int main(void)
- {
- Initialize();
-
- DarkSideOfTheMoon();
- return 1;
- }
-
-